package com.kai.service.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Knife4jConfig {

    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(buildInfo());
    }

    /**
     * API 摘要信息
     */
    private Info buildInfo() {
        return new Info()
                .title("博客服务模块接口文档")
                .description("博客服务模块接口文档")
                .version("1.0.0")
                .contact(new Contact().name("小凯").email("349030617@qq.com"));
    }
}
